package com.example.textsimilarity.config;

import com.baidu.aip.nlp.AipNlp;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class BaiduAIConfig {
    @Value("${baidu.ai.app-id}")
    private String appId;
    
    @Value("${baidu.ai.api-key}")
    private String apiKey;
    
    @Value("${baidu.ai.secret-key}")
    private String secretKey;

    @Bean
    public AipNlp aipNlp() {
        return new AipNlp(appId, apiKey, secretKey);
    }
} 